package ncit.bluetooth.robots;

import java.util.HashMap;

public class Commands {
	
	final static byte B0 = 0x00;
	final static byte SEND_NO_REPLY = (byte) 0x80;
	
	//----------------setOutputState-----------------------------
	
	// Turns on the specified motor. Enables pulse-width modulation (PWM) power to port(s) 
	// according to the specified power value.
	public final static byte SOS_MODE_MOTORON = 0x01; 	
	
	// Break the motor after the action is completed. Applies electronic braking to port(s).
	public final static byte SOS_MODE_BREAKE = 0x02;  	
	
	// Turns on regulation.
	public final static byte SOS_MODE_REGULATED = 0x04; 		
	
	// No regulation will be enabled.
	public final static byte SOS_REGMODE_IDLE = 0x00;			
	
	// Speed regulation means that the NXT firmware attempts to 
	// maintain a certain speed according to the power set-point.
	public final static byte SOS_REGMODE_MOTOR_SPEED = 0x01;	
	
	// Synchronization means that the firmware attempts keep any two motors in synch 
	// regardless of varying physical loads. You typically use this mode is to maintain 
	// a straight path for a vehicle robot automatically.
	public final static byte SOS_REGMODE_MOTOR_SYNC = 0x02;
	
	// Disables power to the specified port, output will be idle.
	public final static byte SOS_MOTOR_RS_IDLE = 0x00;
	
	// Disables power to the specified port, output will be idle.
	public final static byte SOS_MOTOR_RS_RAMPUP = 0x10;
	
	// Output will be running.
	public final static byte SOS_MOTOR_RS_RUNNING = 0x20;
	
	// Output will ramp-down to the speed set-point.
	public final static byte SOS_MOTOR_RS_RAMPDOWN = 0x40;
	
	//Specifies the number of turns to be made
	public final static int TURATION_LIMIT = 0;  //run forever
	
	//-------------------------setInputMode---------------------------------
	
	// No sensor connected to the port.
	public final static byte SIM_ST_NO_SENSOR = 0x00;
	public final static byte SIM_ST_SWITCH = 0x01;
	public final static byte SIM_ST_MODE_LIGHT_ACTIVE = 0x05;
	public final static byte SIM_ST_MODE_LIGHT_INACTIVE = 0x06;
	public final static byte SIM_ST_MODE_SOUND_DB = 0x07;
	public final static byte SIM_ST_MODE_SOUND_DBA = 0x08;
	public final static byte SIM_ST_MODE_LOWSPEED = 0x0A;
	public final static byte SIM_ST_MODE_LOWSPEED_9V = 0x0B;
	
	//----------------------------motors------------------------------------
	public static byte DIRECTION_MOTOR = 0x00;
	public static byte LEFT_BACK_MOTOR = 0x01;
	public static byte RIGHT_BACK_MOTOR = 0x02;
	public static byte ALL_MOTORS = (byte) 0xFF;
	public static byte MAX_POWER_MOTOR = 75;
	
	
	//---------------------------sensors-----------------------------------
	public static byte ULTRASOUND_SENSOR = 0x00;
	public static byte LIGHT_SENSOR = 0x03;
	public static byte LEFT_BACK_TOUCH_SENSOR = 0x01;
	public static byte RIGHT_BACK_TOUCH_SENSOR = 0x02;
	 
	
	public static HashMap<String, Integer> integerSettings = null;
	public static HashMap<String, String> stringSettings = null;
	public static int DeviceType = 0;
	
}
